300
|
How do I get the handle of the cell

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
h := oItems:AddItem("Root 1")
oItems:InsertItem(h,,"Child 1")
oItems:InsertItem(h,,"Child 2")
oItems:SetProperty("ExpandItem",h,.T.)
oItems:SetProperty("CellBold",,oItems:ItemCell(h,0),.T.)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
299
|
How do I retrieve the focused item

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
h := oItems:AddItem("Root 1")
oItems:InsertItem(h,,"Child 1")
oItems:InsertItem(h,,"Child 2")
oItems:SetProperty("ExpandItem",h,.T.)
oItems:SetProperty("ItemBold",oItems:FocusItem(),.T.)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
298
|
How do I get the number or count of child items

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
h := oItems:AddItem("Root 1")
oItems:InsertItem(h,,"Child 1")
oItems:InsertItem(h,,"Child 2")
oItems:SetProperty("ExpandItem",h,.T.)
oItems:AddItem(oItems:ChildCount(h))
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
297
|
How do I enumerate the visible items

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
h := oItems:AddItem("Root 1")
oItems:InsertItem(h,,"Child 1")
oItems:InsertItem(h,,"Child 2")
oItems:SetProperty("ExpandItem",h,.T.)
h := oItems:AddItem("Root 2")
oItems:SetProperty("ItemBold",oItems:FirstVisibleItem(),.T.)
oItems:SetProperty("ItemBold",oItems:NextVisibleItem(oItems:FirstVisibleItem()),.T.)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
296
|
How do I enumerate the siblings items

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
h := oItems:AddItem("Root 1")
oItems:InsertItem(h,,"Child 1")
oItems:InsertItem(h,,"Child 2")
oItems:SetProperty("ExpandItem",h,.T.)
h := oItems:AddItem("Root 2")
oItems:SetProperty("ItemBold",oItems:NextSiblingItem(oItems:FirstVisibleItem()),.T.)
oItems:SetProperty("ItemBold",oItems:PrevSiblingItem(oItems:NextSiblingItem(oItems:FirstVisibleItem())),.T.)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
295
|
How do I get the parent item

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
h := oItems:AddItem("Root 1")
oItems:InsertItem(h,,"Child 1")
oItems:InsertItem(h,,"Child 2")
oItems:SetProperty("ExpandItem",h,.T.)
oItems:SetProperty("ItemBold",oItems:ItemParent(oItems:ItemChild(h)),.T.)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
294
|
How do I get the first child item

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
h := oItems:AddItem("Root 1")
oItems:InsertItem(h,,"Child 1")
oItems:InsertItem(h,,"Child 2")
oItems:SetProperty("ExpandItem",h,.T.)
oItems:SetProperty("ItemBold",oItems:ItemChild(h),.T.)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
293
|
How do I enumerate the root items

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
h := oItems:AddItem("Root 1")
oItems:InsertItem(h,,"Child 1")
oItems:InsertItem(h,,"Child 2")
oItems:SetProperty("ExpandItem",h,.T.)
h := oItems:AddItem("Root 2")
oItems:InsertItem(h,,"Child 1")
oItems:InsertItem(h,,"Child 2")
oItems:SetProperty("ItemBold",oItems:RootItem(0),.T.)
oItems:SetProperty("ItemUnderline",oItems:RootItem(1),.T.)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
292
|
I have a hierarchy, how can I count the number of root items

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
h := oItems:AddItem("Root 1")
oItems:InsertItem(h,,"Child 1")
oItems:InsertItem(h,,"Child 2")
oItems:SetProperty("ExpandItem",h,.T.)
h := oItems:AddItem("Root 2")
oItems:InsertItem(h,,"Child 1")
oItems:InsertItem(h,,"Child 2")
oItems:AddItem(oItems:RootCount())
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
291
|
How can I make an item unselectable, or not selectable

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Column")
oItems := oGantt:Items()
h := oItems:AddItem("unselectable - you can't get selected")
oItems:SetProperty("SelectableItem",h,.F.)
oItems:AddItem("selectable")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
290
|
How can I hide or show an item

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Column")
oItems := oGantt:Items()
h := oItems:AddItem("hidden")
oItems:SetProperty("ItemHeight",h,0)
oItems:SetProperty("SelectableItem",h,.F.)
oItems:AddItem("visible")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
289
|
How can I change the height for all items

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:DefaultItemHeight := 32
oGantt:Columns():Add("Column")
oGantt:Items():AddItem("One")
oGantt:Items():AddItem("Two")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
288
|
How do I change the height of an item

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:ScrollBySingleLine := .T.
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
oItems:SetProperty("ItemHeight",oItems:AddItem("height"),128)
oGantt:Items():AddItem("enabled")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
287
|
How do I disable or enable an item

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
oItems:SetProperty("EnableItem",oItems:AddItem("disabled"),.F.)
oGantt:Items():AddItem("enabled")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
286
|
How do I display as strikeout a cell

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
oItems:SetProperty("CellStrikeOut",oItems:AddItem("strikeout"),0,.T.)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
285
|
How do I display as strikeout a cell or an item

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
oItems:SetProperty("CellCaptionFormat",oItems:AddItem("gets <s>strikeout</s> only a portion of text"),0,1/*exHTML*/)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
284
|
How do I display as strikeout an item

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
oItems:SetProperty("ItemStrikeOut",oItems:AddItem("strikeout"),.T.)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
283
|
How do I underline a cell

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
oItems:SetProperty("CellUnderline",oItems:AddItem("underline"),0,.T.)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
282
|
How do I underline a cell or an item

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
oItems:SetProperty("CellCaptionFormat",oItems:AddItem("gets <u>underline</u> only a portion of text"),0,1/*exHTML*/)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
281
|
How do I underline an item

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
oItems:SetProperty("ItemUnderline",oItems:AddItem("underline"),.T.)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
280
|
How do I display as italic a cell

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
oItems:SetProperty("CellItalic",oItems:AddItem("italic"),0,.T.)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
279
|
How do I display as italic a cell or an item

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
oItems:SetProperty("CellCaptionFormat",oItems:AddItem("gets <i>italic</i> only a portion of text"),0,1/*exHTML*/)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
278
|
How do I display as italic an item

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
oItems:SetProperty("ItemItalic",oItems:AddItem("italic"),.T.)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
277
|
How do I bold a cell

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
oItems:SetProperty("CellBold",oItems:AddItem("bold"),0,.T.)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
276
|
How do I bold a cell or an item

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
oItems:SetProperty("CellCaptionFormat",oItems:AddItem("gets <b>bold</b> only a portion of text"),0,1/*exHTML*/)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
275
|
How do I bold an item

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
oItems:SetProperty("ItemBold",oItems:AddItem("bold"),.T.)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
274
|
How do I change the foreground color for the item

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h,hC
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
h := oItems:AddItem("Root")
hC := oItems:InsertItem(h,,"Child 1")
oItems:SetProperty("ItemForeColor",hC,AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. ))
oItems:InsertItem(h,,"Child 2")
oItems:SetProperty("ExpandItem",h,.T.)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
273
|
How do I change the visual appearance for the item, using your EBN technology

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h,hC
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
h := oItems:AddItem("Root")
hC := oItems:InsertItem(h,,"Child 1")
oItems:SetProperty("ItemBackColor",hC,0x1000000)
oItems:InsertItem(h,,"Child 2")
oItems:SetProperty("ExpandItem",h,.T.)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
272
|
How do I change the background color for the item

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h,hC
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
h := oItems:AddItem("Root")
hC := oItems:InsertItem(h,,"Child 1")
oItems:SetProperty("ItemBackColor",hC,AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. ))
oItems:InsertItem(h,,"Child 2")
oItems:SetProperty("ExpandItem",h,.T.)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
271
|
How do I expand or collapse an item

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
h := oItems:AddItem("Root")
oItems:InsertItem(h,,"Child 1")
oItems:InsertItem(h,,"Child 2")
oItems:SetProperty("ExpandItem",h,.T.)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
270
|
How do I associate an extra data to an item
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
oItems:SetProperty("ItemData",oItems:AddItem("item"),"your extra data")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
269
|
How do I get the number or count of items

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems,oItems1
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
h := oItems:AddItem("Root")
oItems:InsertItem(h,,"Child 1")
oItems:InsertItem(h,,"Child 2")
oItems:SetProperty("ExpandItem",h,.T.)
oItems1 := oGantt:Items()
oItems1:AddItem(oItems1:ItemCount())
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
268
|
How can I specify the width of the ActiveX control, when using the InsertControlItem property

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:ScrollBySingleLine := .F.
oGantt:TreeColumnIndex := 1
oGantt:DrawGridLines := -1/*exAllLines*/
oGantt:Columns():Add("C1")
oGantt:Columns():Add("C2")
oGantt:Columns():Add("C3")
oItems := oGantt:Items()
h := oItems:InsertControlItem(,"MSCAL.Calendar")
oItems:SetProperty("ItemWidth",h,128)
oItems:SetProperty("CellCaption",h,0,"This is a bit of text that is shown in the first column")
oItems:SetProperty("CellSingleLine",h,0,0/*exCaptionWordWrap*/)
oItems:SetProperty("CellCaption",h,2,"This is a bit of text that is shown in the third column")
oItems:SetProperty("CellSingleLine",h,2,0/*exCaptionWordWrap*/)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
267
|
How can I put the ActiveX control in a different column, when using the InsertControlItem property

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:ScrollBySingleLine := .F.
oGantt:DrawGridLines := -1/*exAllLines*/
oGantt:Columns():Add("C1")
oGantt:Columns():Add("C2")
oGantt:Columns():Add("C3")
oItems := oGantt:Items()
h := oItems:InsertControlItem(,"MSCAL.Calendar")
oItems:SetProperty("CellCaption",h,0,"This is a bit of text that is shown in the first column")
oItems:SetProperty("CellSingleLine",h,0,0/*exCaptionWordWrap*/)
oItems:SetProperty("ItemWidth",h,-32001)
oItems:SetProperty("CellCaption",h,2,"This is a bit of text that is shown in the third column")
oItems:SetProperty("CellSingleLine",h,2,0/*exCaptionWordWrap*/)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
266
|
Is there any function I can use to get the program or the control identifier I've been using when called the InsertControlItem

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
oGantt:ScrollBySingleLine := .F.
oGantt:LinesAtRoot := -1/*exLinesAtRoot*/
oItems := oGantt:Items()
h := oItems:InsertControlItem(,"MSCAL.Calendar")
oItems:InsertItem(h,,oItems:ItemControlID(h))
oItems:SetProperty("ExpandItem",h,.T.)
h := oItems:InsertControlItem(,"MSChart20Lib.MSChart")
oItems:SetProperty("ItemAppearance",h,4/*Etched*/)
oItems:InsertItem(h,,oItems:ItemControlID(h))
oItems:SetProperty("ExpandItem",h,.T.)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
265
|
How can I change the height of newly created ActiveX control, using the InsertControlItem

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
oGantt:ScrollBySingleLine := .F.
oItems := oGantt:Items()
oItems:SetProperty("ItemHeight",oItems:InsertControlItem(,"MSCAL.Calendar"),64)
oItems:SetProperty("ItemAppearance",oItems:InsertControlItem(,"MSChart20Lib.MSChart"),4/*Etched*/)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
264
|
How can I change the border for newly created ActiveX control, using the InsertControlItem

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
oGantt:ScrollBySingleLine := .F.
oItems := oGantt:Items()
oItems:SetProperty("ItemAppearance",oItems:InsertControlItem(,"MSCAL.Calendar"),2/*Sunken*/)
oItems:SetProperty("ItemAppearance",oItems:InsertControlItem(,"MSChart20Lib.MSChart"),4/*Etched*/)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
263
|
How can I access the properties and methods for an ActiveX control that I've just added using the InsertControlItem

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oCalendar
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
h := oItems:AddItem("Root")
oCalendar := oItems:ItemObject(oItems:InsertControlItem(h,"MSCAL.Calendar"))
oCalendar:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,255,255 } ) , .F. ))
oCalendar:GridCellEffect := 0
oCalendar:ShowTitle := .F.
oCalendar:ShowDateSelectors := .F.
oItems:SetProperty("ExpandItem",h,.T.)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
262
|
How can I access the properties and methods for an ActiveX control that I've just added using the InsertControlItem

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oCalendar
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
h := oItems:AddItem("Root")
oCalendar := oItems:ItemObject(oItems:InsertControlItem(h,"MSCAL.Calendar"))
oCalendar:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,255,255 } ) , .F. ))
oItems:SetProperty("ExpandItem",h,.T.)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
261
|
How can I insert an ActiveX control

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
h := oItems:AddItem("Root")
oItems:InsertControlItem(h,"MSCAL.Calendar")
oItems:SetProperty("ExpandItem",h,.T.)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
260
|
How do I programmatically edit a cell

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:AllowEdit := .T.
oItems := oGantt:Items()
oItems:Edit(oItems:FocusItem(),0)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
259
|
How can I change at runtime the parent of the item

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL hC,hP
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:LinesAtRoot := -1/*exLinesAtRoot*/
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
hP := oItems:AddItem("Root")
hC := oItems:AddItem("Child")
oItems:SetParent(hC,hP)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
258
|
How can I sort the items

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
h := oItems:AddItem("Root")
oItems:InsertItem(h,,"Child 1")
oItems:InsertItem(h,,"Child 2")
oItems:SetProperty("ExpandItem",h,.T.)
oGantt:Columns:Item("Default"):SortOrder := 2/*SortDescending*/
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
257
|
How do I sort the child items

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
h := oItems:AddItem("Root")
oItems:InsertItem(h,,"Child 1")
oItems:InsertItem(h,,"Child 2")
oItems:SetProperty("ExpandItem",h,.T.)
oItems:SortChildren(h,0,.F.)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
256
|
How can I ensure or scroll the control so the item fits the control's client area
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
h := oGantt:Items:AddItem("item")
oGantt:Items():EnsureVisibleItem(h)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
255
|
How can I remove or delete all items
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
oGantt:Items():AddItem("removed item")
oGantt:Items():RemoveAllItems()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
254
|
How can I remove or delete an item
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
h := oGantt:Items:AddItem("removed item")
oGantt:Items():RemoveItem(h)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
253
|
How can I add or insert child items

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:LinesAtRoot := -1/*exLinesAtRoot*/
oGantt:Columns():Add("C1")
oGantt:Columns():Add("C2")
oItems := oGantt:Items()
h := oItems:AddItem("Cell 1")
oItems:SetProperty("CellCaption",h,1,"Cell 2")
oItems:SetProperty("CellCaption",oItems:InsertItem(h,,"Cell 3"),1,"Cell 4")
oItems:SetProperty("CellCaption",oItems:InsertItem(h,,"Cell 5"),1,"Cell 6")
oItems:SetProperty("ExpandItem",h,.T.)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
252
|
How can I add or insert a child item

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:LinesAtRoot := -1/*exLinesAtRoot*/
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
oItems:InsertItem(oItems:AddItem("root"),,"child")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
251
|
How can I add or insert an item

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("C1")
oGantt:Columns():Add("C2")
oItems := oGantt:Items()
oItems:SetProperty("CellCaption",oItems:AddItem("Cell 1"),1,"Cell 2")
h := oItems:AddItem("Cell 3")
oItems:SetProperty("CellCaption",h,1,"Cell 4")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
250
|
How can I add or insert an item

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
oGantt:Items():AddItem("new item")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
249
|
How can I get the columns as they are shown in the control's sortbar
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL var_Object
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
var_Object := oGantt:Columns:ItemBySortPosition(0)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
248
|
How can I access the properties of a column

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("A")
oGantt:Columns():Item("A"):HeaderBold := .T.
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
247
|
How can I remove all the columns
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Clear()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
246
|
How can I remove a column
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Remove("A")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
245
|
How can I get the number or the count of columns
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL var_Count
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
var_Count := oGantt:Columns:Count()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
244
|
How can I change the font for all cells in the entire column

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oConditionalFormat
LOCAL f
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
f := CreateObject("StdFont")
f:Name := "Tahoma"
f:Size := 12
oConditionalFormat := oGantt:ConditionalFormats():Add("1")
oConditionalFormat:Font := f
oConditionalFormat:ApplyTo := 0/*exFormatToColumns*/
oGantt:Columns():Add("Column")
oGantt:Items():AddItem(0)
oGantt:Items():AddItem(1)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
243
|
How can I change the background color for all cells in the column

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL var_ConditionalFormat
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
var_ConditionalFormat := oGantt:ConditionalFormats:Add("1")
var_ConditionalFormat:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. ))
var_ConditionalFormat:ApplyTo := 0/*exFormatToColumns*/
oGantt:Columns():Add("Column")
oGantt:Items():AddItem(0)
oGantt:Items():AddItem(1)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
242
|
How can I change the foreground color for all cells in the column

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL var_ConditionalFormat
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
var_ConditionalFormat := oGantt:ConditionalFormats:Add("1")
var_ConditionalFormat:SetProperty("ForeColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. ))
var_ConditionalFormat:ApplyTo := 0/*exFormatToColumns*/
oGantt:Columns():Add("Column")
oGantt:Items():AddItem(0)
oGantt:Items():AddItem(1)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
241
|
How can I show as strikeout all cells in the column

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL var_ConditionalFormat
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
var_ConditionalFormat := oGantt:ConditionalFormats:Add("1")
var_ConditionalFormat:StrikeOut := .T.
var_ConditionalFormat:ApplyTo := 0/*exFormatToColumns*/
oGantt:Columns():Add("Column")
oGantt:Items():AddItem(0)
oGantt:Items():AddItem(1)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
240
|
How can I underline all cells in the column

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL var_ConditionalFormat
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
var_ConditionalFormat := oGantt:ConditionalFormats:Add("1")
var_ConditionalFormat:Underline := .T.
var_ConditionalFormat:ApplyTo := 0/*exFormatToColumns*/
oGantt:Columns():Add("Column")
oGantt:Items():AddItem(0)
oGantt:Items():AddItem(1)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
239
|
How can I show in italic all data in the column

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL var_ConditionalFormat
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
var_ConditionalFormat := oGantt:ConditionalFormats:Add("1")
var_ConditionalFormat:Italic := .T.
var_ConditionalFormat:ApplyTo := 0/*exFormatToColumns*/
oGantt:Columns():Add("Column")
oGantt:Items():AddItem(0)
oGantt:Items():AddItem(1)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
238
|
How can I bold the entire column

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL var_ConditionalFormat
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
var_ConditionalFormat := oGantt:ConditionalFormats:Add("1")
var_ConditionalFormat:Bold := .T.
var_ConditionalFormat:ApplyTo := 0/*exFormatToColumns*/
oGantt:Columns():Add("Column")
oGantt:Items():AddItem(0)
oGantt:Items():AddItem(1)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
237
|
How can I display a computed column and highlight some values that are negative or less than a value

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL var_ConditionalFormat
LOCAL oItems,oItems1
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("A")
oGantt:Columns():Add("B")
oGantt:Columns():Add("(A+B)*1.19"):ComputedField := "(%0 + %1) * 1.19"
oItems := oGantt:Items()
oItems:SetProperty("CellCaption",oItems:AddItem(1),1,2)
oItems1 := oGantt:Items()
oItems1:SetProperty("CellCaption",oItems1:AddItem(10),1,20)
var_ConditionalFormat := oGantt:ConditionalFormats:Add("%2 > 10")
var_ConditionalFormat:Bold := .T.
var_ConditionalFormat:SetProperty("ForeColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. ))
var_ConditionalFormat:ApplyTo := 2/*0x2+*/
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
236
|
Can I display a computed column so it displays the VAT, or SUM

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems,oItems1
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("A")
oGantt:Columns():Add("B")
oGantt:Columns():Add("(A+B)*1.19"):ComputedField := "(%0 + %1) * 1.19"
oItems := oGantt:Items()
oItems:SetProperty("CellCaption",oItems:AddItem(1),1,2)
oItems1 := oGantt:Items()
oItems1:SetProperty("CellCaption",oItems1:AddItem(10),1,20)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
235
|
How can I show a column that adds values in the cells

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems,oItems1
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("A")
oGantt:Columns():Add("B")
oGantt:Columns():Add("A+B"):ComputedField := "%0 + %1"
oItems := oGantt:Items()
oItems:SetProperty("CellCaption",oItems:AddItem(1),1,2)
oItems1 := oGantt:Items()
oItems1:SetProperty("CellCaption",oItems1:AddItem(10),1,20)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
234
|
Is there any function to filter the control's data as I type, so the items being displayed include the typed characters

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL var_Column
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
var_Column := oGantt:Columns:Add("Filter")
var_Column:FilterOnType := .T.
var_Column:DisplayFilterButton := .T.
var_Column:AutoSearch := 1/*exContains*/
oGantt:Items():AddItem("Canada")
oGantt:Items():AddItem("USA")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
233
|
Is there any function to filter the control's data as I type, something like filter on type

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL var_Column
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
var_Column := oGantt:Columns:Add("Filter")
var_Column:FilterOnType := .T.
var_Column:DisplayFilterButton := .T.
oGantt:Items():AddItem("Canada")
oGantt:Items():AddItem("USA")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
232
|
How can I programmatically filter a column

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oColumn
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oColumn := oGantt:Columns():Add("Filter")
oColumn:DisplayFilterButton := .T.
oColumn:FilterType := 2/*exNonBlanks*/
oGantt:Items():AddItem()
oGantt:Items():AddItem("not empty")
oGantt:ApplyFilter()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
231
|
How can I show or display the control's filter

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Filter"):DisplayFilterButton := .T.
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
230
|
How can I customize the items being displayed in the drop down filter window

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oColumn
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oColumn := oGantt:Columns():Add("Custom Filter")
oColumn:DisplayFilterButton := .T.
oColumn:DisplayFilterPattern := .F.
oColumn:CustomFilter := "Excel Spreadsheets (*.xls )||*.xls|||Word Documents||*.doc|||Powerpoint Presentations||*.pps|||Text Documents (*.log,*.txt)||*.txt|*.log"
oColumn:FilterType := 3/*exPattern*/
oColumn:Filter := "*.xls"
oGantt:Items():AddItem("excel.xls")
oGantt:Items():AddItem("word.doc")
oGantt:Items():AddItem("pp.pps")
oGantt:Items():AddItem("text.txt")
oGantt:ApplyFilter()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
229
|
How can I change the order or the position of the columns in the sort bar

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:SortBarVisible := .T.
oGantt:SortBarColumnWidth := 48
oGantt:Columns():Add("C1"):SortOrder := 1/*SortAscending*/
oGantt:Columns():Add("C2"):SortOrder := 2/*SortDescending*/
oGantt:Columns:Item("C2"):SortPosition := 0
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
228
|
How do I arrange my columns on multiple levels

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("S"):Width := 32
oGantt:Columns():Add("Level 2"):LevelKey := 1
oGantt:Columns():Add("Level 3"):LevelKey := 1
oGantt:Columns():Add("Level 4"):LevelKey := 1
oGantt:Columns():Add("Level 1"):LevelKey := "2"
oGantt:Columns():Add("Level 2"):LevelKey := "2"
oGantt:Columns():Add("Level 3"):LevelKey := "2"
oGantt:Columns():Add("Level 4"):LevelKey := "2"
oGantt:Columns():Add("E"):Width := 32
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
227
|
How do I arrange my columns on multiple lines

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:HeaderHeight := 32
oGantt:Columns():Add(""):HTMLCaption := "Line 1<br>Line 2"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
226
|
How can I display all cells using HTML format

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("HTML"):SetProperty("Def",17/*exCellCaptionFormat*/,1)
oGantt:Items():AddItem("<font ;12>T</font>his <b>is</b> an <a>html</a> <font Tahoma><fgcolor=FF0000>text</fgcolor></font>.")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
225
|
How can I display all cells using multiple lines

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("MultipleLine"):SetProperty("Def",16/*exCellSingleLine*/,.F.)
oGantt:Columns():Add("SingleLine"):SetProperty("Def",16/*exCellSingleLine*/,.T.)
oItems := oGantt:Items()
oItems:SetProperty("CellCaption",oItems:AddItem("This is a bit of long text that should break the line"),1,"this is a bit of long text that's displayed on a single line")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
224
|
How do change the vertical alignment for all cells in the column

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems,oItems1
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("MultipleLine"):SetProperty("Def",16/*exCellSingleLine*/,.F.)
oGantt:Columns():Add("VAlign"):SetProperty("Def",6/*exCellVAlignment*/,2)
oItems := oGantt:Items()
oItems:SetProperty("CellCaption",oItems:AddItem("This is a bit of long text that should break the line"),1,"bottom")
oItems1 := oGantt:Items()
oItems1:SetProperty("CellCaption",oItems1:AddItem("This is a bit of long text that should break the line"),1,"bottom")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
223
|
How do change the foreground color for all cells in the column

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("ForeColor"):SetProperty("Def",5/*exCellForeColor*/,255)
oGantt:Items():AddItem(0)
oGantt:Items():AddItem(1)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
222
|
How do change the background color for all cells in the column

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("BackColor"):SetProperty("Def",4/*exCellBackColor*/,255)
oGantt:Items():AddItem(0)
oGantt:Items():AddItem(1)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
221
|
How do I show buttons for all cells in the column

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oColumn
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oColumn := oGantt:Columns():Add("Button")
oColumn:SetProperty("Def",2/*exCellHasButton*/,.T.)
oColumn:SetProperty("Def",3/*exCellButtonAutoWidth*/,.T.)
oGantt:Items():AddItem(" Button 1 ")
oGantt:Items():AddItem(" Button 2 ")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
220
|
How do I show buttons for all cells in the column

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Button"):SetProperty("Def",2/*exCellHasButton*/,.T.)
oGantt:Items():AddItem(0)
oGantt:Items():AddItem(1)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
219
|
How do I display radio buttons for all cells in the column

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Radio"):SetProperty("Def",1/*exCellHasRadioButton*/,.T.)
oGantt:Items():AddItem(0)
oGantt:Items():AddItem(1)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
218
|
How do I display checkboxes for all cells in the column

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Check"):SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
oGantt:Items():AddItem(0)
oGantt:Items():AddItem(1)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
217
|
How can I display a tooltip when the cursor hovers the column

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("tooltip"):ToolTip := "This is a bit of text that is shown when user hovers the column."
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
216
|
Is there any function to assign a key to a column instead using its name or capion
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Data"):Key := "DKey"
oGantt:Columns():Item("DKey"):Caption := "new caption"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
215
|
Is there any function to assign any extra data to a column
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Data"):Data := "your extra data"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
214
|
By default, the column gets sorted descending, when I first click its header. How can I change so the column gets sorted ascending when the user first clicks the column's header

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Sort"):DefaultSortOrder := .T.
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
213
|
How can I specify the maximum width for the column, if I use WidthAutoResize property

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oColumn
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oColumn := oGantt:Columns():Add("Auto")
oColumn:WidthAutoResize := .T.
oColumn:MinWidthAutoResize := 32
oColumn:MaxWidthAutoResize := 128
oGantt:Items():AddItem(0)
oGantt:Items():AddItem(1)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
212
|
How can I specify the minimum width for the column, if I use WidthAutoResize property

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oColumn
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oColumn := oGantt:Columns():Add("Auto")
oColumn:WidthAutoResize := .T.
oColumn:MinWidthAutoResize := 32
oGantt:Items():AddItem(0)
oGantt:Items():AddItem(1)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
211
|
Is there any option to resize the column based on its data, captions

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("A"):WidthAutoResize := .T.
oGantt:Items():AddItem(0)
oGantt:Items():AddItem(1)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
210
|
How can I align the icon in the column's header in the center

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oColumn
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
oColumn := oGantt:Columns():Add("")
oColumn:HeaderImage := 1
oColumn:HeaderImageAlignment := 1/*CenterAlignment*/
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
209
|
How do I align the icon in the column's header to the right

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oColumn
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
oColumn := oGantt:Columns():Add("ColumnName")
oColumn:HeaderImage := 1
oColumn:HeaderImageAlignment := 2/*RightAlignment*/
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
208
|
How do I show or hide the sorting icons, but still need sorting
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Sorted"):SortOrder := 1/*SortAscending*/
oGantt:Columns:Item(0):DisplaySortIcon := .F.
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
207
|
How do I enable or disable the entire column

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems,oItems1
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("C1")
oGantt:Columns():Add("Disabled"):Enabled := .F.
oItems := oGantt:Items()
oItems:SetProperty("CellCaption",oItems:AddItem(0),1,"0.1")
oItems1 := oGantt:Items()
oItems1:SetProperty("CellCaption",oItems1:AddItem(1),1,"1.1")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
206
|
How do I disable drag and drop columns
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("C1"):AllowDragging := .F.
oGantt:Columns():Add("C2"):AllowDragging := .F.
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
205
|
How do I disable resizing a column at runtime
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Unsizable"):AllowSizing := .F.
oGantt:Columns():Add("C2")
oGantt:Columns():Add("C3")
oGantt:Columns():Add("C4")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
204
|
How can I align the column to the right, and its caption too

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oColumn
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oColumn := oGantt:Columns():Add("Column")
oColumn:Alignment := 2/*RightAlignment*/
oColumn:HeaderAlignment := 2/*RightAlignment*/
oGantt:Items():AddItem(0)
oGantt:Items():AddItem(1)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
203
|
How can I align the column to the right

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Column"):Alignment := 2/*RightAlignment*/
oGantt:Items():AddItem(0)
oGantt:Items():AddItem(1)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
202
|
How do I change the column's caption

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Column"):Caption := "new caption"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
201
|
Can I change the visual effect, appearance for the anchor, hyperlink elements, in HTML captions, after the user clicks it

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems,oItems1
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:SetProperty("FormatAnchor",.F.,"<b><u><fgcolor=880000> </fgcolor></u></b>")
oGantt:Columns():Add("Column")
oItems := oGantt:Items()
oItems:SetProperty("CellCaptionFormat",oItems:AddItem("Just an <a1>anchor</a> element ..."),0,1/*exHTML*/)
oItems1 := oGantt:Items()
oItems1:SetProperty("CellCaptionFormat",oItems1:AddItem("Just another <a2>anchor</a> element ..."),0,1/*exHTML*/)
oGantt:Items():AddItem("next item")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|